#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n, k;
    cin >> n >> k;
    vector<int> happy(n);
    vector<int> shame(n);
    for (int i = 0; i < n; i++)
        cin >> happy[i];
    for (int i = 0; i < n; i++)
        cin >> shame[i];

    long long ret = 1;
    long long maxhappy = accumulate(happy.begin(), happy.begin() + k, 0);
    long long minshame = accumulate(shame.begin(), shame.begin() + k, 0);
    long long h = maxhappy;
    long long s = minshame;
    for (int left = 1, right = k; right < n; left++, right++)
    {
        h -= happy[left - 1];
        s -= shame[left - 1];
        h += happy[right];
        s += shame[right];
        if (h > maxhappy)
        {
            maxhappy = h;
            minshame = s;
            ret = left + 1;
        }
        else if (h == maxhappy)
        {
            if (s < minshame)
            {
                maxhappy = h;
                minshame = s;
                ret = left + 1;
            }
        }
    }
    cout << ret;
    return 0;
}